<?php use app\models\User; use app\models\Record;?>
<main class="problem"><article style="width: 100%"><div class="ul list transition"><div class="frame list">
<div class="li">
	<div class="container container-header">
		<div class="id">编号</div>
		<div class="user">用户</div>
		<div class="problem">题目</div>
		<div class="status">状态</div>
		<div class="number">时间</div>
		<div class="number">内存</div>
		<div class="time">提交时间</div>
	</div>
</div>
<?php foreach($list as $record): ?>
<div class="li">
	<div class="container">
		<div class="id info"><b><a href="/record/show/<?php echo $record['submitid'] ?>">#<?php echo $record['submitid'] ?></a></b></div>
		<div class="user"><a href="/user/?id=<?php echo $record['user_info']['id']?>"><?php echo $record['user_info']['nickname']?></a></div>
		<div class="problem"><b><a href="/problem/show/<?php echo $record['problem_info']['id'] ?>"><?php echo $record['problem_info']['name'] ?></a></b></div>
		<div class="status"><b><?php echo Record::getStatusColor($record['status'], '16')?></b></div>
		<div class="number"><?php echo $record['time']?>ms</div>
		<div class="number"><?php echo $record['memory']?>KB</div>
		<div class="time"><?php echo $record['submittime']?></div>
	</div>
</div>
<?php endforeach ?>
<div class="container-page">
    <a href="/record/?page=<?php if ($page<=1) echo 1; else echo $page-1; ?>">
    	<button class="blue">
        	<i class="fa fa-angle-left fa-lg" style="color: white;"></i>
    	</button>
    </a>
	<a href="/record/?page=<?php if ($page>=$pages) echo $pages; else echo $page+1; ?>">
    	<button class="blue">
        	<i class="fa fa-angle-right fa-lg" style="color: white;"></i>
    	</button>
	</a>
</div>
</div></div></article></main>